package com.google.code.bbdsm.domain.logic;

import com.google.code.bbdsm.domain.*;

import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import org.springframework.validation.ValidationUtils;

public class DataSourceValidator implements Validator {

	public boolean supports(Class candidate) {
		return DataSource.class.isAssignableFrom(candidate);
		
	}

	public void validate(Object target, Errors errors) {
		
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "batchUid", "errors.validation.isrequired");
		
	}

	
}
